﻿@model YuYuKiCms.Model.MenuLinkVm
@{
    var controller = ViewContext.RouteData.Values["controller"].ToString();
    var action = ViewContext.RouteData.Values["action"].ToString();
}

<li>
    @if (controller.Equals(Model.Controller, StringComparison.OrdinalIgnoreCase) && action.Equals(Model.Action, StringComparison.OrdinalIgnoreCase))
    {
        <a class="active">@Model.LinkText</a>
    }
    else
    {
        @Html.ActionLink(Model.LinkText, Model.Action, Model.Controller, Model.RouteValues, Model.HtmlAttribute)
    }
</li>